//
//  SEGFiveStarCell.h
//  YYKitDemo
//
//  Created by 刘山 on 2017/11/3.
//  Copyright © 2017年 Sam. All rights reserved.
//

#import "SEGTimeView.h"
@class SEGFiveStarCellModel;

@protocol SEGFiveStarCellDelegate <NSObject>
-(void)seg_openLinkUrl:(SEGFiveStarCellModel*)data;
@end

@interface SEGFiveStarCellModel : NSObject
@property (nonatomic, copy) NSString *time;
@property (nonatomic, copy) NSString *content;
@property (nonatomic, copy) NSString *link;
@end

@interface SEGFiveStarCellLayout : NSObject
//  内容展示高度
@property (nonatomic, assign) CGFloat contentHeight;
@property (nonatomic, strong)SEGTextLayout *contentLayout;

//  展示链接高度
@property (nonatomic, assign) CGFloat linkHeight;
@property (nonatomic, strong)SEGTextLayout *linkLayout;

@property (nonatomic, strong)SEGTimeLayout *timeLayout;

@property (nonatomic, assign) CGFloat height;
@property (nonatomic, assign) CGFloat marginTop;// 顶部留白
@property (nonatomic, assign) CGFloat marginBottom;// 下边留白

@property (nonatomic, strong)SEGFiveStarCellModel *data;

- (instancetype)initWithData:(SEGFiveStarCellModel *)data;
@end

@interface SEGFiveStarCell : UITableViewCell
@property (nonatomic, assign) id<SEGFiveStarCellDelegate> delegate;
@property (nonatomic, strong)SEGLabel *contentLabel;
@property (nonatomic, strong)SEGLabel *linkLabel;
@property (nonatomic, strong)SEGTimeView *timeView;
- (void)setLayout:(SEGFiveStarCellLayout *)layout;
@property (nonatomic, strong)SEGFiveStarCellLayout *layout;
@end
